package com.fy;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


public class test2 {
    /*static String json_str="{\"catalogue_id\":1,\"data\":[{\"ID\":\"634\",\"Name\":\"于东\"},{\"ID\":\"822\",\"Name\":\"于祎\"}," +
            "{\"ID\":\"782\",\"Name\":\"于燕\"},{\"ID\":\"636\",\"Name\":\"于玲\"}," +
            "{\"ID\":\"841\",\"Name\":\"于浩\"},{\"ID\":\"383\",\"Name\":\"于娟\"}]}";*/

   /* static  int catalogue_id =1;
    static String userId = "1,2,3,4,5,6,7,8";
*/
   /* public static void main(String[] args) throws JSONException {
        JSONObject jsonObject  =   JSONObject.fromObject(json_str);
        //String s =  (String) jsonObject.get("Name");
        int s  =  jsonObject.getInt("total");//目录名称
        JSONArray jsonArray =  jsonObject.getJSONArray("data");


        System.out.println(jsonArray.size());
        for (int i =0;i<jsonArray.size();i++){
            JSONObject date  = JSONObject.fromObject(jsonArray.get(i));
            System.out.println("ID:"+date.getString("ID"));
            System.out.println("Name:"+date.getString("Name"));
        }*/
  /* public static void main(String[] args) {
       String userArray[] = userId.split(",");
       for (int i=0;i<userArray.length;i++){

           System.out.println("userid =========="+userArray[i]);
           System.out.println("catalogue_id =========="+catalogue_id);
      }

    }*/

    //static  long date =  1586336183171;
 /*   public static void main(String[] args) {
        Date dateold = new Date(date);
        String

    }*/
 /*public static void main(String[] args)  throws ParseException {
     Date dateold  = new Date(date);
     String formatType = "yyyy年MM月dd日 HH时mm分ss秒";
     String sDateTime = dateToString(dateold,formatType);
     Date date = stringToDate(sDateTime, formatType);
     System.out.println(date);
 }
    public static String dateToString(Date data, String formatType) {
        return new SimpleDateFormat(formatType).format(data);
    }
    public static Date stringToDate(String strTime, String formatType)
            throws ParseException {
        SimpleDateFormat formatter = new SimpleDateFormat(formatType);
        Date date = null;
        date = formatter.parse(strTime);
        return date;
    }*/

    public static void main(String[] args) {
        String time ="01:22:02";
        String[] videotime = time.split(":");
        long hour = Long.parseLong(videotime[0]);
        long min = Long.parseLong(videotime[1]);
        long sec = Long.parseLong(videotime[2]);
        long s = hour*3600+min*60+sec;

        long hours = s / ( 60 * 60);
        long minutes = (s-hours*(60 * 60 ))/60;
        long secs = (s-hours*(60 * 60 )-minutes*60);
        String diffTime="";
         if(minutes<10){
             if (secs < 10){
                 diffTime=hours+":0"+minutes+":0"+secs;
             }else {
                 diffTime=hours+":0"+minutes+":"+secs;
             }
         }else{
             if (secs < 10){
                 diffTime=hours+":"+minutes+":0"+secs;
             }else {
                 diffTime=hours+":"+minutes+":"+secs;
             }
         }
        Date date = new Date();
        date.setTime(s);
        System.out.println(diffTime);
        double a = 1;
        double b =1;

        double y;
        y = 72.73-b*8.314*293*a;
        System.out.println("y=================="+y);
        /*SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss");
        String fmDate=simpleDateFormat.format(date);

        System.out.println(fmDate);
        System.out.println(s);*/
    }
}
